package com.robot.orders.pojo.client;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * member实体类
 *
 * @author lin
 */
@Entity
@Table(name = "merchant_member")
public class MerchantMember implements Serializable {
    /**
     * id
     */
    @Id
    private String id;
    /**
     * 公司id
     */
    private String companyId;
    /**
     * 店铺id
     */
    private String storeId;
    /**
     * 会员id
     */
    private String memberId;
    /**
     * 会员昵称
     */
    private String nickname;
    /**
     * 会员手机号
     */
    private String phone;
    /**
     * 会员头像
     */
    private String avatar;
    /**
     * 会员会员注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime registeredAt;
    /**
     * 会员消费次数
     */
    private Integer consumptionFrequency;
    /**
     * 会员累计消费
     */
    private Double totalConsumption;
    /**
     * 会员推荐人数
     */
    private Integer recommendedNumber;
    /**
     * 会员推荐人
     */
    private String recommender;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    /**
     * 最后更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
    /**
     * 删除时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deletedAt;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public LocalDateTime getRegisteredAt() {
        return registeredAt;
    }

    public void setRegisteredAt(LocalDateTime registeredAt) {
        this.registeredAt = registeredAt;
    }

    public Integer getConsumptionFrequency() {
        return consumptionFrequency;
    }

    public void setConsumptionFrequency(Integer consumptionFrequency) {
        this.consumptionFrequency = consumptionFrequency;
    }

    public Double getTotalConsumption() {
        return totalConsumption;
    }

    public void setTotalConsumption(Double totalConsumption) {
        this.totalConsumption = totalConsumption;
    }

    public Integer getRecommendedNumber() {
        return recommendedNumber;
    }

    public void setRecommendedNumber(Integer recommendedNumber) {
        this.recommendedNumber = recommendedNumber;
    }

    public String getRecommender() {
        return recommender;
    }

    public void setRecommender(String recommender) {
        this.recommender = recommender;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public LocalDateTime getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(LocalDateTime deletedAt) {
        this.deletedAt = deletedAt;
    }

    @Override
    public String toString() {
        return "MerchantMember{" +
                "id='" + id + '\'' +
                ", companyId='" + companyId + '\'' +
                ", storeId='" + storeId + '\'' +
                ", memberId='" + memberId + '\'' +
                ", nickname='" + nickname + '\'' +
                ", phone='" + phone + '\'' +
                ", avatar='" + avatar + '\'' +
                ", registeredAt=" + registeredAt +
                ", consumptionFrequency=" + consumptionFrequency +
                ", totalConsumption=" + totalConsumption +
                ", recommendedNumber=" + recommendedNumber +
                ", recommender='" + recommender + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", deletedAt=" + deletedAt +
                '}';
    }
}
